package com.liuqm.controller;

import com.liuqm.service.ICzktActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 活动表 控制器
 * </p>
 *
 * @author liuqiaomiao
 * @ClassName CzktActivityController
 * @since 2024-10-21
 */
@RestController
@RequestMapping("/activity")
public class CzktActivityController {

    @Autowired
    private ICzktActivityService czktActivityService;

    /**
     * 通过活动id获取活动信息
     * @param activityId
     * @return
     */
    @RequestMapping("/selectById")
    public Object getCzktActivityById(Integer activityId){
        return  czktActivityService.getById(activityId);
    }


    /**
     * 修改活动库存
     * @param id
     * @return
     */
    @RequestMapping("/updateStockNumById")
    public Object updateStockNumById(Integer id){
        return  czktActivityService.updateActivity(id);
    }
}
